import request from '@/utils/request'

// 查询常见问题列表
export function listQuestion (query) {
  return request({
    url: '/system/question/list',
    method: 'get',
    params: query
  })
}

// 查询常见问题详细
export function getQuestion (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/question/getInfo',
    method: 'get',
    params: params
  })
}

// 新增常见问题
export function addQuestion (data) {
  return request({
    url: '/system/question/insert',
    method: 'post',
    data: data
  })
}

// 修改常见问题
export function updateQuestion (data) {
  return request({
    url: '/system/question/update',
    method: 'post',
    data: data
  })
}

// 删除常见问题
export function delQuestion (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/question/delete',
    method: 'post',
    params: params
  })
}
// 批量删除常见问题
export function delBatchQuestion (ids) {
  const params = {
    'ids': ids
  }
  return request({
    url: '/system/question/deleteBatch',
    method: 'post',
    params: params
  })
}

// 导入常见问题
export function importData (data) {
  return request({
    url: '/system/question/importData',
    method: 'post',
    data: data
  })
}
